<template>
  <div class="ImgList">
    <myheader></myheader>
    <van-tabs v-model="activeName" sticky animated class='tabs'>
      <van-tab :title="value.title" v-for="value in messageList" :key='value.id'>
        <imagesList :imagesId='value.id'></imagesList>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import myheader from "@/components/myheader";
import {getImgCateGory} from '@/apis/imgcategory'
import imagesList from './imagesList'
export default {
  components: {
    myheader,imagesList
  },
  data(){
    return{
      messageList:[],
      activeName:0
    }
  },
  mounted(){
    getImgCateGory()
    .then(res=>{
      // console.log(res);
      this.messageList=res.data.message
      // console.log(this.messageList);
      // let all={id:0,title:'全部'}
     this.messageList.unshift({id:0,title:'全部'})
    //  this.messageList=this.messageList.push(all)
      // console.log(this.messageList);
      

      })
     
  },
 
}
</script>
<style lang="less" scoped>
.ImgList{
  /deep/.van-tabs__nav{
     .van-tab__text{
    color:#26a2ff;
    font-size:1.083333rem;
  }
  }

}
</style>